/*
 * @Author: wuyuxin
 * @Date: 2022-01-11 17:09:42
 * @LastEditors: wuyuxin
 * @LastEditTime: 2022-01-11 17:18:55
 * @Description: 
 */
import { MOUNTED, MOUNTING,NOT_MOUNTED } from "../applications/app.helpers.js";
export async function toMountPromise(app) {
  if (app.status !== NOT_MOUNTED) {
    return app;
  }
  app.status = MOUNTING;
  await app.mount();
  app.status = MOUNTED;
  return app;
}